package br.com.knowledge.persistence.hibernate.entities;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * AbdTriggerinferencia entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "abd_triggerinferencia", schema = "public")
public class AbdTriggerinferencia implements java.io.Serializable {

	// Fields
	private AbdTriggerinferenciaId id;
	private BcdTrigger bcdTrigger;
	private BcdColunas bcdColunas;

	// Constructors

	/** default constructor */
	public AbdTriggerinferencia() {
	}

	/** full constructor */
	public AbdTriggerinferencia(AbdTriggerinferenciaId id,
			BcdTrigger bcdTrigger, BcdColunas bcdColunas) {
		this.id = id;
		this.bcdTrigger = bcdTrigger;
		this.bcdColunas = bcdColunas;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "bcdColunasId", column = @Column(name = "bcd_colunas_id", nullable = false)),
			@AttributeOverride(name = "idtrigger", column = @Column(name = "idtrigger", nullable = false)),
			@AttributeOverride(name = "tipoacao", column = @Column(name = "tipoacao", nullable = false, length = 1)) })
	public AbdTriggerinferenciaId getId() {
		return this.id;
	}

	public void setId(AbdTriggerinferenciaId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idtrigger", nullable = false, insertable = false, updatable = false)
	public BcdTrigger getBcdTrigger() {
		return this.bcdTrigger;
	}

	public void setBcdTrigger(BcdTrigger bcdTrigger) {
		this.bcdTrigger = bcdTrigger;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "bcd_colunas_id", nullable = false, insertable = false, updatable = false)
	public BcdColunas getBcdColunas() {
		return this.bcdColunas;
	}

	public void setBcdColunas(BcdColunas bcdColunas) {
		this.bcdColunas = bcdColunas;
	}

}